/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Cristian
 */
@Entity
@Table(name = "directorios")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Directorios.findAll", query = "SELECT d FROM Directorios d"),
    @NamedQuery(name = "Directorios.findByDirectorio", query = "SELECT d FROM Directorios d WHERE d.directorio = :directorio"),
    @NamedQuery(name = "Directorios.findByDescripcion", query = "SELECT d FROM Directorios d WHERE d.descripcion = :descripcion"),
    @NamedQuery(name = "Directorios.findByObservaciones", query = "SELECT d FROM Directorios d WHERE d.observaciones = :observaciones"),
    @NamedQuery(name = "Directorios.findByDirectorioid", query = "SELECT d FROM Directorios d WHERE d.directorioid = :directorioid")})
public class Directorios implements Serializable {
    private static final long serialVersionUID = 1L;
    @Size(max = 100)
    @Column(name = "directorio")
    private String directorio;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 255)
    @Column(name = "descripcion")
    private String descripcion;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 255)
    @Column(name = "observaciones")
    private String observaciones;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "directorioid")
    private Integer directorioid;

    public Directorios() {
    }

    public Directorios(Integer directorioid) {
        this.directorioid = directorioid;
    }

    public Directorios(Integer directorioid, String descripcion, String observaciones) {
        this.directorioid = directorioid;
        this.descripcion = descripcion;
        this.observaciones = observaciones;
    }

    public String getDirectorio() {
        return directorio;
    }

    public void setDirectorio(String directorio) {
        this.directorio = directorio;
    }

    public String getDescripcion() {
        return descripcion;
    }

    public void setDescripcion(String descripcion) {
        this.descripcion = descripcion;
    }

    public String getObservaciones() {
        return observaciones;
    }

    public void setObservaciones(String observaciones) {
        this.observaciones = observaciones;
    }

    public Integer getDirectorioid() {
        return directorioid;
    }

    public void setDirectorioid(Integer directorioid) {
        this.directorioid = directorioid;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (directorioid != null ? directorioid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Directorios)) {
            return false;
        }
        Directorios other = (Directorios) object;
        if ((this.directorioid == null && other.directorioid != null) || (this.directorioid != null && !this.directorioid.equals(other.directorioid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entities.Directorios[ directorioid=" + directorioid + " ]";
    }
    
}
